home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_plotutils.idb / usr / freeware / share / ode / soliton.ode.z / soliton.ode
Encoding:
Text File  |  1998-10-28  |  432 b   |  26 lines

  1. # You may run this example by doing:
  2. #
  3. #    ode < soliton.ode | graph -T X -C
  4. #
  5. # or alternatively, to create a real-time plot,
  6. #
  7. #    ode < soliton.ode | graph -T X -C -x 5 15 5 -y -3 3
  8.  
  9. # This example numerically solves an initial value problem arising in
  10. # John Selker's soliton thesis:
  11. # x'' = (2 / t) * x' + B * x
  12. # B = -1
  13. # x(5) = 0
  14. # x'(5) = 1
  15.  
  16. x' = vx
  17. vx' = 2 / t * vx + B * x
  18. B = -1
  19.  
  20. x = 0
  21. vx = 1
  22.  
  23. print t, x
  24. step 5, 15
  25.